Skip to content

Chore: Historical chunks#7

Merged
tmosleyIII merged 2 commits into
mainfrom
chore/tmosley/flowctl-updates
Jun 20, 2026
Merged

Chore: Historical chunks#7
tmosleyIII merged 2 commits into
mainfrom
chore/tmosley/flowctl-updates

Conversation

@tmosleyIII

Copy link
Copy Markdown
Contributor

This pull request introduces support for historical chunk reporting to the SDK, allowing components to report the progress, completion, verification, and failure of bounded ledger work-units to the flowctl control plane. It adds a new Reporter implementation, updates documentation, and brings in new and updated dependencies to support these features.

Historical Chunk Reporting:

  • Added a new Reporter in pkg/component/reporter.go that enables components to emit lifecycle and historical chunk state to flowctl, including progress, completion, verification, and failure reporting. This includes environment-based configuration, chunk state updates, heartbeats, and no-op handling when disabled.
  • Added comprehensive unit tests for the new reporter in pkg/component/reporter_test.go, verifying configuration parsing, no-op behavior, and required parameters.

Documentation:

  • Updated README.md with a new section on "Historical Chunk Reporting," including usage examples and details on the environment contract. [1] [2]

Dependency Management:

  • Updated go.mod to add github.com/withobsrvr/flowctl and update github.com/withObsrvr/flow-proto to v0.1.3, as well as to add and update several indirect dependencies required for chunk reporting and observability. [1] [2]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new pkg/component-level Reporter for emitting bounded “historical chunk” lifecycle state (progress/completion/verification/failure) and component heartbeats to the flowctl control plane, along with documentation and dependency updates needed to support the new reporting flow.

Changes:

  • Added pkg/component/reporter.go implementing env-driven configuration, registration, heartbeats, and chunk run upserts.
  • Added unit tests for env parsing and no-op/required-parameter behavior in pkg/component/reporter_test.go.
  • Updated README.md, go.mod, and go.sum to document and pull in the required flowctl/proto dependencies.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Documents “Historical Chunk Reporting” usage and env contract.
pkg/component/reporter.go New reporter implementation for registration/heartbeats/chunk state upserts.
pkg/component/reporter_test.go Unit tests for configuration parsing and disabled/required-parameter behavior.
go.mod Adds github.com/withobsrvr/flowctl and bumps flow-proto, plus indirect deps.
go.sum Lockfile updates for newly added/updated dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/component/reporter.go
Comment thread pkg/component/reporter.go Outdated
Comment on lines +60 to +64
cfg Config
conn *grpc.ClientConn
client flowctlpb.ControlPlaneClient
serviceID string
}
Comment thread pkg/component/reporter.go Outdated
Comment on lines +131 to +135
if resp.ServiceId != "" {
r.serviceID = resp.ServiceId
} else {
r.serviceID = r.cfg.ComponentID
}
Comment thread pkg/component/reporter.go Outdated
Comment on lines +144 to +147
serviceID := r.serviceID
if serviceID == "" {
serviceID = r.cfg.ComponentID
}
Comment thread pkg/component/reporter.go
Comment on lines +75 to +78
if cfg.ComponentID == "" {
return nil, fmt.Errorf("FLOWCTL_COMPONENT_ID is required when ENABLE_FLOWCTL=true")
}

@tmosleyIII tmosleyIII merged commit e1053a9 into main Jun 20, 2026
1 check passed
@tmosleyIII tmosleyIII deleted the chore/tmosley/flowctl-updates branch June 20, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants